package com.tsd.jxc.report.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tsd.core.utils.DoubleUtil;
import com.tsd.core.utils.HlpUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName: JxcBuySaleBillDetailVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2024/5/14 10:33
 * @Version: 1.0
 */
public class JxcBuySaleBillDetailVo {

    private String index = "ROW()-1";

    private String type;

    private String goods_sid;

    private String goods_code;

    private String goods_name;

    private String goods_spec;

    private String goods_model;

    private String unit_name;

    private BigDecimal qty;

    private BigDecimal qty4base;

    private BigDecimal amount;

    private BigDecimal tax_amount;

    private BigDecimal total_amount;

    private String bill_code;

    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
    private Date bill_date;

    private BigDecimal price;

    private BigDecimal tax_rate;

    private String party_sid;

    private String party_code;

    private String party_name;

    private String party_short_name;

    private String party_display;

    private Integer audit_state;

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGoods_sid() {
        return goods_sid;
    }

    public void setGoods_sid(String goods_sid) {
        this.goods_sid = goods_sid;
    }

    public String getGoods_code() {
        return goods_code;
    }

    public void setGoods_code(String goods_code) {
        this.goods_code = goods_code;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getGoods_spec() {
        return goods_spec;
    }

    public void setGoods_spec(String goods_spec) {
        this.goods_spec = goods_spec;
    }

    public String getGoods_model() {
        return goods_model;
    }

    public void setGoods_model(String goods_model) {
        this.goods_model = goods_model;
    }

    public String getUnit_name() {
        return unit_name;
    }

    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }

    public BigDecimal getQty() {
        return qty;
    }

    public void setQty(BigDecimal qty) {
        this.qty = qty;
    }

    public BigDecimal getQty4base() {
        return qty4base;
    }

    public void setQty4base(BigDecimal qty4base) {
        this.qty4base = qty4base;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTax_amount() {
        return tax_amount;
    }

    public void setTax_amount(BigDecimal tax_amount) {
        this.tax_amount = tax_amount;
    }

    public BigDecimal getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(BigDecimal total_amount) {
        this.total_amount = total_amount;
    }

    public String getBill_code() {
        return bill_code;
    }

    public void setBill_code(String bill_code) {
        this.bill_code = bill_code;
    }

    public Date getBill_date() {
        return bill_date;
    }

    public void setBill_date(Date bill_date) {
        this.bill_date = bill_date;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTax_rate() {
        return tax_rate;
    }

    public void setTax_rate(BigDecimal tax_rate) {
        this.tax_rate = tax_rate;
    }

    public String getParty_sid() {
        return party_sid;
    }

    public void setParty_sid(String party_sid) {
        this.party_sid = party_sid;
    }

    public String getParty_code() {
        return party_code;
    }

    public void setParty_code(String party_code) {
        this.party_code = party_code;
    }

    public String getParty_name() {
        return party_name;
    }

    public void setParty_name(String party_name) {
        this.party_name = party_name;
    }

    public String getParty_short_name() {
        return party_short_name;
    }

    public void setParty_short_name(String party_short_name) {
        this.party_short_name = party_short_name;
    }

    public String getParty_display() {
        return party_display;
    }

    public void setParty_display(String party_display) {
        this.party_display = party_display;
    }

    public Integer getAudit_state() {
        return audit_state;
    }

    public void setAudit_state(Integer audit_state) {
        this.audit_state = audit_state;
    }
    public String getType_name() {
        if ("sale_order".equals(this.getType())) {
            return "销售订单";
        }
        if ("sale_return".equals(this.getType())) {
            return "销售退货";
        }
        if ("buy_order".equals(this.getType())) {
            return "采购订单";
        }
        if ("buy_return".equals(this.getType())) {
            return "采购退货";
        }
        return null;
    }

}
